package com.shopweb.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.shop.bean.Shop;

import java.util.Map;

@Mapper
public interface ShopMapper {
	@Insert("insert sys_shop set id=#{id},price=#{price},title=#{title},content=#{content},simpleDesc=#{simpleDesc},createDate=#{createDate},score=#{score},type=#{type},salesNum=#{salesNum},status=#{status},maxOrder=#{maxOrder},maxNum=#{maxNum}")
	public int insert(Shop shop);
	@Select("select * from sys_shop where id=#{id}")
	public Shop getShopById(String id);
    @Update("update sys_shop set status=#{status} where id=#{id}")
	public int updateStatusById(Map<String,Object> params);
}
